import request from '@/plugin/axios'

export function fetchList (data) {
  return request({
    url: '/freight/getFreightList',
    method: 'get',
    params: data
  })
}


export function createOrEdit (data) {
  return request({
    url: '/freight/createOrEdit',
    method: 'post',
    data
  })
}

export function deleteById (data) {
  return request({
    url: '/freight/deleteById',
    method: 'get',
    params: {
      id: data
    }
  })
}

export function getPostCode (data) {
  return request({
    url: '/sysregion/' + data,
    method: 'get',
  })
}

export function getFreighRegiontList (data) {
  return request({
    url: '/freight/getFreighRegiontList',
    method: 'get',
    params: data
  })
}

export function createOrEdit4FreightRegion (data) {
  return request({
    url: '/freight/createOrEdit4FreightRegion',
    method: 'post',
    data
  })
}

export function deleteById4FreighRegiont (data) {
  return request({
    url: '/freight/deleteById4FreighRegiont',
    method: 'get',
    params: {
      id: data
    }
  })
}